//
//  MKCollectionModelObjectBase.h
//  MKUI
//
//  Created by 苏尚进 on 2020/10/10.
//  Copyright © 2020 moon. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface MKCollectionModelObjectBase : NSObject<NSCopying>

#pragma - SubscriptKey
@property(nonatomic,strong,nullable) id modelValue;
+ (instancetype)modelWithValue:(nullable id)modelVaule;
//id value = model[@"key"];
//model[@"key"] = nil;
//model[@"key"] = @(YES);
@property(nonatomic,readonly) NSMutableDictionary *dynamicProperties;
- (void)setObject:(nullable id)obj forKeyedSubscript:(id<NSCopying>)key;
- (nullable id)objectForKeyedSubscript:(id<NSCopying>)key;
@end

@interface MKCollectionModelObjectBase(MKUI_ValueForKeyPathOtherwise)
- (nullable id)mk_valueForKeyPath:(NSString *)path otherwise:(nullable id)other;
@end
NS_ASSUME_NONNULL_END
